<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>消缺查询</title>
    <link rel="stylesheet" href="/webjars/layui/2.5.5/css/layui.css"  media="all">
</head>
<body>
<form class="layui-form" action="">
    <div class="layui-form-item" style="margin-top: 50px">
        <div class="layui-inline">
            <label class="layui-form-label">任务编号</label>
            <div class="layui-input-inline">
                <input type="tel" name="taskId" id="taskId" lay-verify="required|phone" autocomplete="off" class="layui-input">
            </div>
            <label class="layui-form-label">任务状态</label>
            <div class="layui-input-inline">
                <select  id="service" name="bugType" lay-verify="required"  class="select">
                    <option value=" ">--请选择--</option>
                </select>
            </div>
            <label class="layui-form-label">缺陷类型</label>
            <div class="layui-input-inline">
                <select  id="service1" name="bugType" lay-verify="required"  class="select">
                    <option value=" ">--请选择--</option>
                </select>
            </div>
            <label class="layui-form-label">缺陷级别</label>
            <div class="layui-input-inline">
                <select  id="service2" name="bugLevel" lay-verify="required"  class="select">
                    <option value=" ">--请选择--</option>
                </select>
            </div>
        </div>
    </div>
    <div class="layui-form-item" style="margin-top: 10px">
        <div class="layui-inline">
            <label class="layui-form-label">工作单据</label>
            <div class="layui-input-inline">
                <select  id="service3" name="bugLevel" lay-verify="required"  class="select">
                    <option value=" ">--请选择--</option>
                </select>
            </div>
            <label class="layui-form-label">下发时间：</label>
            <div class="layui-input-inline" style="width: 180px">
                <input type="text" class="layui-input"  name="discoverTime"  placeholder="" id="kaishi">
            </div>
            <div class="layui-form-mid">————</div>
            <div class="layui-input-inline" style="width: 180px">
                <input type="text" class="layui-input"  name="discoverTime" placeholder="" id="jeiShu">
            </div>
            <button type="button" class="layui-btn" style="margin-left: 80px" onclick="ChaXun()">查询</button>
        </div>
    </div>
</form>


<script src="/webjars/layui/2.5.5/layui.js" charset="utf-8"></script>
<script>
    layui.use(["jquery","layer","form","table","laydate"],function () {
        let form = layui.form;
        let $ = layui.$;
        let table = layui.table;
        let laydate = layui.laydate;
        laydate.render({
            elem: '#kaishi'
        });
        laydate.render({
            elem: '#jeiShu'
        });
        /*缺陷类型下拉框*/
        $.ajax({
            url:"/XunJianZhiXing/QueLeiXia2",
            dataType: 'json',
            success: function(data) {
                if (data!== null) {
                    $("#service1").empty();
                    $("#service1").append(new Option("--请选择--", "0"));
                    $.each(data, function(index, item) {
                        $('#service1').append(new Option(item.configName,item.id));
                    });
                } else {
                    $("#service1").append(new Option("暂无数据", ""));
                }
                //重新渲染
                form.render("select");
            }
        })
        /*缺陷级别拉框*/
        $.ajax({
            url:"/XunJianZhiXing/ChaQueJi",
            dataType: 'json',
            success: function(data) {
                if (data!== null) {
                    $("#service2").empty();
                    $("#service2").append(new Option("--请选择--", "0"));
                    $.each(data, function(index, item) {
                        $('#service2').append(new Option(item.configName,item.id));
                    });
                } else {
                    $("#service2").append(new Option("暂无数据", ""));
                }
                //重新渲染
                form.render("select");
            }
        })
        /*工作单据下拉框赋值*/
        $.ajax({
            url:"/XiaoQueHuiZhi/ChaGongDan",
            dataType: 'json',
            success: function(data) {
                if (data!== null) {
                    $("#service3").empty();
                    $("#service3").append(new Option("--请选择--", " "));
                    $.each(data, function(index, item) {
                        $('#service3').append(new Option(item.configName,item.id));
                    });
                } else {
                    $("#service3").append(new Option("暂无数据", ""));
                }
                //重新渲染
                form.render("select");
            }
        })
        /*任务状态下拉框*/
        $.ajax({
            url:"/XiaoQueHuiZhi/ChaRenWuZhuang",
            dataType: 'json',
            success: function(data) {
                if (data!== null) {
                    $("#service").empty();
                    $("#service").append(new Option("--请选择--", "0"));
                    $.each(data, function(index, item) {
                        $('#service').append(new Option(item.configName,item.id));
                    });
                } else {
                    $("#service").append(new Option("暂无数据", ""));
                }
                //重新渲染
                form.render("select");
            }
        })
    })
</script>
</body>
</html>